package 牛客;

import java.util.Scanner;

/**
 * @Auther: zhang l
 * @Date: 2022/4/11 - 04 - 11 - 19:36
 * @Description: 牛客
 * @version: 1.0
 */
public class 小球走过的距离 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        float h=scanner.nextFloat();
        int n=scanner.nextInt();
        float sum=0;
        for(int i=0;i<n;i++){
            sum+=h;
            h/=2;
            if(i==n-1){
                System.out.println(String.format("%.3f", h)+" "+String.format("%.3f", sum));
            }
            sum+=h;
        }

    }
}
